<?php require APP_ROOT.'public/top.php';?>

<div id="g-body" class="g-bd f-cb" style="background:none">
  <div class="g-mn">
    <div id="bread" style="background-color:#F2F2F2;padding:2px 10px;width:100%;z-index:999"><a class="light-blue" href="/adplan/list">投放管理</a> &gt; 新建计划</div>
    <div id="g-content" class="g-ct" style="margin-left:0">
      <h3 class="g-ct-title f-cb" style="border-bottom:none">
        <div style="float:left;line-height:30px;margin-left:5%;width:33%">
          <div class="step1-circle" style="align:center;background-color:#00993C;-webkit-border-radius:100px;float:left;height:30px;line-height:30px;text-align:center;width:30px"><span class="step1">1</span></div>
          <span class="step1-desc" style="color:#000;font-weight:700;font-size:14px"> &nbsp;&nbsp;&nbsp;&nbsp;第一步 设置推广计划&nbsp;&nbsp;&nbsp;&nbsp;------------------------------------</span></div>
        <div style="float:left;line-height:30px;width:31%">
          <div class="step2-circle" style="align:center;background-color:darkgray;-webkit-border-radius:100px;float:left;height:30px;line-height:30px;text-align:center;width:30px"><span class="step2">2</span></div>
          <span class="step2-desc" style="color:darkgray;font-weight:700;font-size:14px">&nbsp;&nbsp;&nbsp;&nbsp;第二步 设置推广组&nbsp;&nbsp;&nbsp;&nbsp;------------------------------------</span></div>
        <div style="float:left;line-height:30px;width:31%">
          <div class="step3-circle" style="align:center;background-color:darkgray;-webkit-border-radius:100px;float:left;height:30px;line-height:30px;text-align:center;width:30px"><span class="step3">3</span></div>
          <span class="step3-desc" style="color:darkgray;font-weight:700;font-size:14px"> &nbsp;&nbsp;&nbsp;&nbsp;第三步 设置推广创意</span></div>
      </h3>
      <form id="plan-form" style="padding:20px" class="c-form" method="post" autocomplete="off" action="index.php?m=cms&a=add_save" novalidate="novalidate" onsubmit="return return_message()">
        <input name="level" type="hidden" value="plan" />
        <input name="data[date]" type="hidden" id="date" value="<?php echo time();?>" />
        <input name="data[version_id]" type="hidden" id="version_id" value="1" />
        <input name="data[type_id]" type="hidden" id="type_id" value="<?php echo $type_id;?>" />
        <input name="data[state]" type="hidden" id="state" value="1" />
        <dl class="f-cb os">
          <dt>广告模式: </dt>
          <dd>
            <?php
		$input_p = M('input')->where(array('input_pid'=>552))->select();
		foreach($input_p as $k2=>$v2){
		?>
            <label>
              <input class="f-vam" type="radio" id="ggms" name="data[ggms]" value="<?php echo $v2['input_value'];?>">
              <?php echo $v2['input_name'];?></label>
            &nbsp;&nbsp;&nbsp;&nbsp;
		<?php }?>
          </dd>
        </dl>
        <dl class="f-cb">
          <dt>推广计划名称: </dt>
          <dd>
            <p>
              <input class="c-input required" type="text" id="plan_name" name="data[plan_name]" maxlength="32">
            </p>
            <p class="f-gray">当前最多可输入16个汉字或32个字符</p>
          </dd>
        </dl>
        <dl class="f-cb">
          <dt>每日预算: </dt>
          <dd>
            <p>
              <label>
                <input class="f-vam" type="radio" name="data[isys]" value="1" checked>
                不限</label>
              &nbsp;&nbsp;&nbsp;&nbsp;
              <label>
                <input class="f-vam" type="radio" name="data[isys]" value="2">
                自定义:&nbsp;&nbsp;
              <input class="c-input number digits" style="width:100px" max="2000000" min="0" type="text" name="data[ys]" id="ys">
              </label>
              元
              <label class="error" generated="true" for="budget"></label>
            </p>
            <p class="f-gray">您每天的支出上限，每日预算用完后推广将会停止投放</p>
          </dd>
        </dl>
        <dl class="f-cb">
          <dt>推广目的: </dt>
          <dd>
          <?php
		$input_p = M('input')->where(array('input_pid'=>557))->select();
		foreach($input_p as $k2=>$v2){
		?>
            <label>
              <input class="f-vam" type="radio" id="md" name="data[md]" value="<?php echo $v2['input_value'];?>">
              <?php echo $v2['input_name'];?></label>
              
            &nbsp;&nbsp;&nbsp;&nbsp;
            <?php }?>
          </dd>
        </dl>
        <dl class="f-cb os">
          <dt>操作系统: </dt>
          <dd>
          <?php
		$input_p = M('input')->where(array('input_pid'=>560))->select();
		foreach($input_p as $k2=>$v2){
		?>
            <label>
              <input class="f-vam" type="radio" id="xt" name="data[xt]" value="<?php echo $v2['input_value'];?>">
              <?php echo $v2['input_name'];?></label>
            &nbsp;&nbsp;&nbsp;&nbsp;
            <?php }?>
          </dd>
        </dl>
        <dl class="f-cb app" style="display: none;">
          <dt>推广APP: </dt>
          <dd>
            <label id="app_error" class="error" generated="true" for="app_id" style="vertical-align:initial"></label>
            <div class="w-info f-clear"> 您暂时没有能推广的APP,请联系销售对您的手机助手开发账户进行关联 </div>
          </dd>
        </dl>
        <dl class="f-cb">
          <dt>投放时间: </dt>
          <dd>
            <p>
              <label>开始日期:&nbsp;&nbsp;
                <input id="start_date" class="c-input is-datepick" style="width:80px" type="text" name="data[start_date]" readonly="" value="2020-07-26" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})">
              </label>
              &nbsp;&nbsp;
              <label>结束日期:&nbsp;&nbsp;
                <input id="end_date" class="c-input is-datepick" style="width:80px" type="text" name="data[end_date]" readonly="" value="无结束时间" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})">
              </label>
            </p>
            <p class="f-gray">审核通过后，推广将会按照您设定的时间来投放</p>
          </dd>
        </dl>
        <dl class="f-cb">
          <dt>投放时段: </dt>
          <dd id="plan-time">
            <div id="advert-period-bar"><span id="advert-period-bar-tip">全部时段</span>&nbsp;&nbsp;<a id="advert-period-bar-btn" class="c-btn5" href="javascript:void(0)">更改</a></div>
          </dd>
        </dl>
        <dl class="f-cb">
          <dt>预算消耗方式<i class="f-efonts f-fs14 j-tips" data-tips="匀速消费控制在搜索广告上不生效"></i>: </dt>
          <dd>
          <?php
		$input_p = M('input')->where(array('input_pid'=>566))->select();
		foreach($input_p as $k2=>$v2){
		?>
            <p>
              <label>
                <input class="f-vam" type="radio" id="xhfs" name="data[xhfs]" value="<?php echo $v2['input_value'];?>">
              <?php echo $v2['input_name'];?></label>
              <span class="f-gray" style="margin-left:20px">将每日预算均匀地分配到整个投放日程中</span></p>
              <?php }?>

            
          </dd>
        </dl>
        <dl class="f-cb">
          <dt>&nbsp; </dt>
          <dd> <a id="submit" class="c-button-01" onClick="adsubmit()">保存并继续</a>&nbsp; <a id="cancel" class="c-button-02" href="<?php echo session('listurl');?>">取消</a>
            <p class="f-gray">添加组定向信息后，推广计划才能生效</p>
          </dd>
        </dl>
        <input type="hidden" name="_csrf" value="SnEyaFRFRkEsRlkkMxoEJhU0dho/Ah4XCEhFCjJxczQZAXEyBgAvdA==">
      </form>
    </div>
  </div>
</div>

<script>
function adsubmit(){
	$('#plan-form').submit();
}


</script> 



<?php require APP_ROOT.'public/bottom.php';?>
